Pattern recognition preprocessing techniques



1967 G. L. SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREIPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 1 Z O E: w 5 as c: 55% E r-Z is; :2: .2 o C (Jbflx-Ly) DELAY ELAY DELAY DELAY g,DELAY INVENTORS GLENHORE LSHELTON JR BLAWRENCE P. HURWIT A ORNEY 1967 e L.SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 2 OUTPUT PATTERN FIG. 2

INPUT SPECIMEN f(x,y)

Aug. 29, 1967 sHELTON, JR. ETAL 3,33

PATTERN RECOGNITION PHEPROCESSINU TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 5 FIG.40

w-h-buaw-b-bmabamawmuu-b 1967 G. 1.. SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES l8 Sheets-Sheet OriginalFiled June 14, 1962 66 4 Tw n00 30 00 .11 00 .141 0 l 99 3 00 99 numwm ls 3 36 0 99 00 M 6 66 .U 99 WMH i 99 7 0 720 ll 99 9 9 4| 1|! 2 9m 4 66MW 05! 102353 23 1450 I111 l l l l l l l l l l l l 0521022310 2654 l llll l l lll l l l l l O n 4 '66 4 mm 90 04 1 .1 ||.1|| 800 9 55 7 g-1967 G. SHELTON, JR.. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 1 18 Sheets-Sheet 5 FlG.4c

Aug. 29, 1967 G. L. SHELTON, JR. ETAL Original Filed June 14, 1962 l8Sheets-Sheet 6 FIG. 4d

(4) q (x, y)

1967 G. 1.. SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 7 FIG. 46

CONNECTIVITY FUNCTION FIRST STAGE OUTPUT Aug. 29, 1967 G l... SHELTON,JR. ET AL PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original FiledJune 14, 1962 FIG. 4f

18 Sheets-Sheet E CONNECTIVITY FUNCTION SECON D STAGE OUTPUT Aug. 29,1967 G. SHELTON, JR.. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets$heet 9 FIG. 49

so 121 1511 199 196 191 151 122 as 46 CONNECTIVITY FUNCTION THIRD STAGEOUTPUT 29, 1967 G. 1 SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 1O ETEAT FIG.5O B X G CONNECTIVITY A D CONDITIONSOPERATING ZONE CONDITIONS WHEN FUNCTION TS PRESENT(X=1) (PRIME AND ARROWINDICATE CONNECTIVITY FUNCHQN 0130151011 0F PRESENT ITERATION) F r A 1 10T 1 AGFHYGEJ *0 x *0 x *0 x 0 1 1 AEB'T'F) *0 x *0 x 0 1 1 0 1 0 1AH(B'E+DG) *0 x 0 *0 x x 0 x 1 T 0 AGDTBT) 0 x 1 x 1 0 AFO'1B'F0) *o x xx 0 1 *0 1 1 *0 1 1 *0 1 0 1 0 1 BHETJ 1 x 1 x0 ,1 FIG 0 8G(D'+E) 1 x 1FIG.

1957 G. 1.. SHELTON, JR.. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 11 CONNECTIVITY CONDITIONS 1 0 1 1 0 1 1 0 1CHUB'D'G) +0 X x 0 1 0 1 1 0 1 0F1E0+B0 +0 x +0 x 0 g 0 F 0 1 w 0001? +0x +0 x 0 1 1 EFTST) x 0 :0 x 0 +0 1 1 E01B'+01 +0 X 0 1 H 1 0 1 11100'51 :9 0 x 0 x 0 1 +0 1 1 Aug. 29, 1967 G. 1.. SHELTON, JR. ETAL3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14 196218 Sheets-Sheet 1 f5 SH IFT GATED AMPL- OR "1 P AND,

{ r g M- N 7' 0 z 3 N LL. Z1 Z. m Lu C 53 z l- 8 a 3 LL] 0: 2 H c 1 5 iT Q :2 (D I 2 INPUT L:

2ND THRESHOLD CIRCUIT SHIFT RESET Aug. 29, 1967 SHELTON, JR. ETAL3,339,179

PATTERN RECOGNITION PRFJFROCESSING TECHNIQUES 18 Sheets-Sheet 14Original Filed June 14, 1962 E615 EQIwMEE $5655 5&8 HIE .P 25 s\FiL 2 21225 h. Qz 5:: [EL 1 mo 5! H :5: c E: h a 3 2 s 2952i Zwzz8 JQ .QY m 0 ia 7 V. m W 1411+ a 1 I I 1 i U I U U 1 A W mm: M q 1% i T h m 556mm Kim:5 5565. Kim a a Aug. 29, 1967 Original Filed June 14, 1962 G. L.SHELTON, JR. ETAL PATTERN RECOGNITION PREPROCESSING TECHNIQUES 18Sheets-Sheet 15 A C ACE'UJGE) H5 I a I NG.* I if? B7 a FIG. 7a

OR- I G AGO(B'E) a AMPL, I

AFWB'EG) H5 I a 4 l -E T H an 'c) E I a *W 1 scans) E OR-H s 115 F muse)m 0' j Aug. 29, 1967 Original Filed June 14, 1962 G.L.SHELTON,JR ETALPATTERN RECOGNITION FREPROCESSING TECHNIQUES l8 Sheets-Sheet 16 \BIASEDH MAJORITY CIRCUIT FlG.7b

FlG.

FIG. 7b

FIG.7

CON N ECTIVITY FUNCTION Aug. 29, 1967 G. 1.. SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION FREPROCESSINF: TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 1'7 FIG.8

THRESHOLD CIRCUIT Allg- 1967 G. 1.. SHELTON, JR. ETAL 3,339,179

PATTERN RECOGNITION PREPROCESSING TECHNIQUES Original Filed June 14,1962 18 Sheets-Sheet 18 FIGJO SHIFT REGISTER l T I I a [a a a a a 1511111 f 1 f T r T 1 1 3* T l 1 o 1 Jr 1 0 1 o s R s R s R 8 R A1 J +1 IFIG.

BIASED MAJORITY CIRCUIT United States Patent 3,339,179 PATTERNRECOGNITION PREPROCESSING TECHNIQUES Glenmore L. Shelton, .lr., Carmel,N.Y., and Lawrence P.

Horwitz, Versoix, Switzerland, assignors to International BusinessMachines Corporation, New York, N.Y., a corporation of New YorkContinuation of application Ser. No. 202,452, June 14, 1962. Thisapplication Feb. 23, 1966, Ser. No. 538,504 2 Claims. (Cl. 340-1463)This invention relates to preprocessing techniques for patternrecognition systems and, in particular, to technique for analyzing atwo-dimensional, binary pattern for the presence of features includingthe location of the center line within a thick line, line intersections,slopes and end points, line curvature, and other features.

This application is a continuation of co-pending application, Ser. No.202,452, which was file-d on June 14, 1962.

Some pattern recognition systems base recognition on the presence orabsence of features such as: lines of various shapes, intersections, endpoints, shapes of areas, etc. Other systems provide identification basedon mask matching or cross-correlating techniques using the entirepattern. Some systems operate directly on the pattern to be identifiedand others include some form of preprocessing such as: automaticclipping level control to compensate for intensity variations;generation of secondary functions, such as autocorrelation functions.Fourier transforms, etc.; compensation for misregistration; etc. Thepreprocessing techniques in the present invention are useful in many ofthese identification systems because they provide a pattern which isidentical in shape to the input binary pattern to be identified, buthaving values with a ridge that is approximately centered within eachline. This pattern also contains indications of intersection points, endpoints, line curvature, line slopes, etc.

The pattern is obtained by iteratively operating on the pattern to beidentified with a matrix labelled the incidence" matrix. The result ofoperating on a wide-line input pattern by the incidence matrix is togenerate an output pattern having a ridge of relatively high valuesalong the center of each wide line and lower values on either side ofthe ridge. Intersection points and end points are also determinable bythe relative amplitudes of the values along the ridges. The operation ofthe incidence matrix and the configuration of the resulting pattern willbe described in detail below in conjunction with a system for generatingthe pattern and selecting features from the pattern for use by arecognition system.

An object of the present invention is to provide indications of thepresence of features in a pattern.

A further object is to provide indications of the presence of featuressuch as various-shaped lines, intersections, line slopes, and end pointsin a pattern.

Another object is to generate a thin-line pattern from a wide-linepattern.

A further object is to operate on an input pattern with an incidencematrix to provide indications of the presence of features such asvarious-shaped lines, intersections, and end points.

A still further object is to iteratively operate on an input patternwith an incidence matrix to generate an output pattern havingindications of the presence of features such as various-shaped lines,intersections, and end points.

In accordance with the invention, an input pattern (x,y) is iterativelyoperated on by an incidence matrix p(x,y) to generate an nth-orderoutput pattern q,,(x,y).

If the pattern to be identified is considered to be a matrix of discreteareas having coordinates (x,y) that are predominately black orpredominately white, depending upon the positions of the lines that thespecimen comprises, there is a binary function f(x,y) that is 1 for eachinstance where the area at the coordinates (x,y) is black and 0" wherewhite. This pattern (x,y) is operated on by the incidence matrix p(x,y)to generate the first order output pattern q (x,y) as follows:

The expression ,(x+x y+y,) is intended to represent, in a general sense,a pattern of coordinate points surrounding the point x,y. The subscriptl (i.e., x and y means that the surrounding coordinate points arelocated one coordinate unit from the point x,y.

Among the many incidence matrices which provide excellent results is thebasic matrix:

Using this incidence matrix (2) in the Formula 1 for q (x,y) results in:

The incidence matrix shown in Equation 2 controls the design of acircuit (to be later described) such that the function q (x,y,) isgenerated according to Equations 1 or 3. This function has values thatare equal to the sum of the points that are left (xl,y), below (x,y1),above (x,y+1) and right (x+1,y) of each point (x,y) in the inputfunction, when the point (x,y) is 1" and they are equal to 0 when thepoint (x,y) is O."

Since q is a function of the binary pattern f(x,y), the non-zero (black)portion of the binary attern is replaced by a multivalued pattern, andthe zero (white) data in the input pattern remains zero. That is, theoperation of the incidence function does not spread the nonzero portionof the input pattern into the zero data areas as is caused by manypreprocessing functions.

The operation of the incidence matrix can be summarized by saying that amatrix p(x.y) is centered on a point (x,y) of a binary pattern. If thepoint has a nonzero value, a summation is taken between the surroundingbits of the matrix and the associated points of the pattern on whichthey lie. This operation is repeated for each point in the pattern andeach nonzero point in the pattern is then given a new value equal to thevalue of the summation which took place for such point. Thus a newpattern is produced which is composed of points which have the values ofthe performed summations.

The second order output pattern q (x,y) is generated by operating on thefirst order output pattern q (x,y) in a similar manner as follows:

The function (4) may be rewritten without dependence upon q (x,y) asfollows:

which may be further expanded for the particular p matrix (2) toprovide:

Similarly, the n-order output function q (x,y) is described as:

which can be rewritten as:

The derivations of each q(x,y) of Formulas 4, 5, 6, 7, 8, can besummarized as follows. The resultant pattern produced by the firstsummation and consisting of a pattern of points which are summationresults is operated on by the incident matrix p(x,y) in the same way asthe original pattern. The matrix p(x,y) is centered on each point of thesecond pattern and a summation between the surrounding points of thematrix and the surrounding points of the nonzero points of the secondpattern are summed and the resultant summation is placed in the positionof such point. This is an iterative technique. As in the case of thefirst pattern, each summation for each point is performed only if thepoint does not have a zero value.

The effect of such summations is that nonzero points which aresurrounded by other nonzero points will produce a resultant point havinga relatively high summation value, whereas nonzero end points of thepattern and the like which are not surrounded by other nonzero points inthe pattern will have relatively low values of summation.

The data elements in the output pattern q generated in accordance withthe preceding formulas are representative of the number of differentconnected paths that begin at each point on the input pattern where eachpath is permitted to traverse only non-zero input data elements (i.e.,each path must have all of its points within the black area of the inputpattern). Thus, q (x,y)=r indicates that there are r paths of length nthat begin at point (x,y) of the input pattern. For example, if q(3,2):13, then there are thirteen paths of length 3 that begin at point(3,2) on the input pattern. The following example input configuration f(any) falls within this example:

The Z-step paths are:

The 3-step paths are:

These results can be derived from the preceding formulas in thefollowing manner. The l-step paths that are present in the configuration(9) are obtained using Formulas 1 and 2 which provide the following q(x,y) pattern:

3 D 0 0 0 2 Q ,Y)=

2 U l) 2 3 3 y 1 0 0 2 3 3 Thus, these are two l-step paths starting atpoint (3,2) as listed at (10) above. The Z-step paths that are presentin the configuration (9) are obtained using Formulas 2 and 4, whereFormula 4 indicates the same type of operation on the function q (1) and(13) that performed on the input function f(x,y) to obtain q and resultsin:

0 0 o 0 4 q" ,Y)=

T 2 0 o 5 s 7 y 1 o 0 5 7 e a 9 q" y) Thus, there are thirteen 3-steppaths starting at point (3, 2) as listed above at (12).

In proceeding from diagram (9) through diagram (15) of the specificationit must be remembered that the 3x3 incident matrix of diagram (2) iscentered in sequence on each point of the 4X 5 matrix and a summation ismade for each nonzero point of the 4X5 matrix. Thus the center point ofthe matrix of diagram (2) is placed in sequence over each of the twentypoints of the 4X5 matrix and a summation of the surrounding points istaken for those points of the 4x5 matrix which have

1. AN APPARATUS FOR OPERATING ON A DATA REPRESENTATION F(X,Y) OF ARELATIVELY WIDE-LINE INPUT PATTERN TO GENERATE A DATA REPRESENTATION OFA THIN-LINE OUTPUT PATTERN COMPRISING, IN COMBINATION: A FIRST MEANS FORLINEARLY COMBINING A PLURALITY OF SIGNALS; MEANS FOR PRESENTING THEINPUT DATA CORRESPONDING TO A PLURALITY OF THE POINTS (X$X1, Y$Y1) INTHE INPUT PATTERN THAT SUROUND A REFERENCE POINT (X,Y), FOR ALLREFERENCE POINTS (X,Y), TO THE FIRST LINEAR COMBINING MEANS; A FIRSTGATING MEANS RESPONSIVE TO THE INPUT DATA AND RESPONSIVE TO THE OUTPUTOF THE FIRST LINEAR COMBINING MEANS FOR PASSING, AS A FIRST INTERMEDIATEDATA REPRESENTATION OF A FIRST INTERMEDIATE PATTERN, THE OUTPUT OF THEFIRST LINEAR COMBINING MEANS WHEN THE CORRESPONDING REFERENCE POINTS(X,Y) ASSUME A PREDETERMINED VALUE; A SECOND MEANS FOR LINEARLYCOMBINING A PLURALITY OF SIGNALS; MEANS FOR PRESENTING A FIRSTINTERMEDIATE DATA CORRESPONDING TO A PLURALITY OF THE POINTS (X$X1,Y$Y1) IN THE FIRST INTERMEDIATE PATTERN THAT SURROUND A REFERENCE POINT(X,Y) FOR ALL REFERENCE POINTS (X,Y) TO THE SECOND LINEAR COMBININGMEANS; A SECOND GATING MEANS RESPONSIVE TO THE FIRST INTERMEDIATE DATAAND RESPONSIVE TO THE FIRST INTERMELINEAR COMBINING MEANS FOR PASSING,AS A SECOND INTERMEDIATE DATA REPRESENTATION Q(2) (X,Y) OF A SECONDINTERMEDIATE PATTERNS, THE OUTPUT OF THE SECOND LINEAR COMBINING MEANSWHEN THE CORRESPONDING REFERENCE POINTS (X,Y) ASSUME A PREDETERMINEVALUE; THRESHOLD MEANS FOR SELECTING THOSE DATA ELEMENTS IN THE SECONDINTERMEDIATE REPRESENTATION THAT HAVE VALUES IN EACH OF A PLURALITY OFNON-OVERLAPPING RANGES OF VALUES;